package models

import (
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(255)"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type CarType struct {
	gorm.Model
	TypeNo      string `gorm:"type:varchar(50)"` //类型编码
	TypeName    string `gorm:"type:varchar(50)"` //类型名称
	TypeContent string `gorm:"type:varchar(50)"` //类型描述
}

type Car struct {
	gorm.Model
	CarNo   string `gorm:"type:varchar(50)"`
	CarName string `gorm:"type:varchar(50)"`
	CarCode string `gorm:"type:varchar(50)"`
	Tid     int    `gorm:"type:int"`
}

type CarTypeList struct {
	TypeId      int    `gorm:"type:int"`
	TypeNo      string `gorm:"type:varchar(50)"` //类型编码
	TypeName    string `gorm:"type:varchar(50)"` //类型名称
	TypeContent string `gorm:"type:varchar(50)"` //类型描述
	CarNo       string `gorm:"type:varchar(50)"`
	CarName     string `gorm:"type:varchar(50)"`
	CarCode     string `gorm:"type:varchar(50)"`
}

// /////////////////合同订单表

type Contract struct {
	gorm.Model
	ContractNo string `gorm:"type:varchar(50)"` //合同编码
	ConName    string `gorm:"type:varchar(50)"` //客户信息
	ConPrice   int    `gorm:"type:int"`         //合同金额
	Cid        int    `gorm:"type:int"`
}

type CarCon struct {
	gorm.Model
	CarConNo   string `gorm:"type:varchar(50)"` //车辆编码
	CarConName string `gorm:"type:varchar(50)"` //车辆信息
	CarConNum  string `gorm:"type:varchar(50)"` //车牌号
}

type CarConTractList struct {
	CarConId   int    `gorm:"type:int"`
	ContractNo string `gorm:"type:varchar(50)"` //合同编码
	ConName    string `gorm:"type:varchar(50)"` //客户信息
	ConPrice   int    `gorm:"type:int"`         //合同金额
	CarConNo   string `gorm:"type:int"`         //车辆编码
	CarConName string `gorm:"type:varchar(50)"` //车辆信息
	CarConNum  string `gorm:"type:varchar(50)"` //车牌号
}
